{% extends 'publisher/base.html' %}
{% load staticfiles %}
{% block content %}
<!-- Page Heading -->
<div class="row">
    <div class="col-lg-12">
        <h1 class="page-header">
            Publication
            <small>View others publications and peer review them</small>
        </h1>
        <ol class="breadcrumb">
            <li>
                <i class="fa fa-book"></i> <a href="/publish">Catalog</a>
            </li>
            <li class="active">
                Publication #{{ publication.publication_id }}
            </li>
        </ol>
    </div>
</div>
<!-- /.row -->


<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">{{ publication.title }}</h3>
            </div>
            <div class="panel-body">
                <p>{{ publication.description }}</p>
                <br>
                </br>
                <iframe id="pdf_publication" src="{{ publication.file.url }}" width="100%" height="650px"></iframe>
                <br>
                <p>
                <button onclick="ajax_peer_review_modal(0);"
                             id="add_review_btn"
                           name="add_review_btn"
                          style="float: right;"
                           type="button"
                          class="btn btn-lg btn-success"
                    {% if user_review.user == user %}
                       disabled='true'
                    {% endif %}>
                    <i class="fa fa-plus"></i> Add Review
                </button>
                </p>
            </div>
        </div>
    </div>
</div><!-- /.row -->



<!-- REVIEWS -->
<div class="row">
    <div class="form-group">
        <label class="col-sm-3 control-label">
            Reviews
        </label>
    </div>
</div><!-- /.row -->

<div class="row">
    <div class="form-group">
        <label class="col-sm-12" style="font-weight:normal;">
            <div class="table-responsive">
                <div id="peer_reviews_table"
                   name="peer_reviews_table">
                   {% include "publisher/publication/table.html" with form=form %}
                </div>
            </div>
        </label>
    </div>
</div><!-- /.row -->



<!-- Modal -->
<div id="ajax_modal_placeholder"
   name="ajax_modal_placeholder"></div>
<!-- end modal -->



<!-- Ads -->
<div class="row">
    <div class="col-lg-12">
        {% if HAS_ADVERTISMENT %}
        {% include "publisher/publication/ad.html" %}
        {% endif %}
    </div>
</div>
<!-- /.Ads-->

{% include 'publisher/publication/js.html' %}
{% endblock content %}
